﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Controls;

namespace FileBrowser.Model
{
    public class Folder : IData
    {
        public Folder()
        {
            SubFolders = new List<Folder>();
            Files = new List<File>();
            Height = 220;
            Width = 220;
            //graphicalRepresentation = new Grid();
        }
        

        public List<Folder> SubFolders { get; set; }
        public List<File> Files { get; set; }
        public Folder Parent { get; set; }
        

        public override List<IData> getItems()
        {
            List<IData> result = new List<IData>();
            result.AddRange(SubFolders);
            result.AddRange(Files);
            return result;
        }

        protected override void setName(string name)
        {
            DataIcon = IDataUtils.getIconFromFolder(name);
        }
        
        
        public override IData.Type getType()
        {
            return IData.Type.Folder;
        }

    }
}
